package com.design.patterns.factory;

/**
 * 工厂设计模式测试
 * @author wujiwen
 * @date 2017-07-22
 */
public class FactoryTest {
    public static void main(String[] args) {
        //普通工厂模式测试
        SendFactory factory = new SendFactory();
        Sender sender = factory.produce("mail");
        sender.send();
        
        //多个工厂方法模式测试
        Sender sender2 = factory.produceMail();
        sender2.send();
        
        
        //静态工厂方法测试
        Sender staSend = SendFactory.staProduceMail();
        staSend.send();
    }
}
